<%@ include file="/WEB-INF/pages/taglibs.jsp" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	
</head>

<body>
<div>
	<div class="container" style="margin-top: 16px;">
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label control-required"><fmt:message key="report.custom.chart.type" bundle="${i18n_report}" /></label>
				<div class="col-md-7">
					<select id="select_charttype" onchange="changeChartType()">
						<c:forEach items="${chartTypes }" var="charttype" varStatus="status">
							<option value="${charttype }">
								<fmt:message key="report.custom.chart.type.${charttype }" bundle="${i18n_report}" />
							</option>
							<c:if test="${status.first }">
								<c:set var="firsttype" value="${charttype }" scope="page" />
							</c:if>
						</c:forEach>
					</select>
				</div>
				<span>
					<i class="fa fa-line-chart fa-2x" />
				</span>
			</div>
		</div>
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label">统计图标题</label>
				<div class="col-md-7">
					<input type="text" name="chart.title" value="" class="form-control" />
				</div>
				<p class="form-control-static">如果不设置，统计图标题使用系统内置标题 </p>
			</div>
		</div>
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label"><fmt:message key="report.custom.chart.topn" bundle="${i18n_report}" /></label>
				<div class="col-md-7">
					<select name="chart.topn" class="form-control" >
						<option value="5">5</option>
						<option value="10" selected="selected">10</option>
						<option value="15">15</option>
						<option value="20">20</option>
					</select>
				</div>
				<p class="form-control-static"><fmt:message key="report.custom.chart.topn.tip" bundle="${i18n_report}" /></p>
			</div>
		</div>
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label"><fmt:message key="report.custom.chart.group" bundle="${i18n_report}" /></label>
				<div class="col-md-7">
					<select name="chart.group" class="form-control">
						<c:forEach items="${groupItems }" var="groupitem" varStatus="status">
							<option value="${groupitem.name }">${groupitem.text }</option>
							<c:if test="${status.first }">
								<c:set var="group1" value="${groupitem.name }" scope="page" />
							</c:if>
							<c:if test="${status.last }">
								<c:set var="groupCount" value="${status.count }" scope="page" />
							</c:if>
						</c:forEach>
					</select>
				</div>
				<p class="form-control-static"><fmt:message key="report.custom.chart.group.tip.category" bundle="${i18n_report}" /></p>
			</div>
		</div>
		<div class="col-md-12">
			<div class="form-group">
				<label class="col-md-2 control-label control-required"><fmt:message key="report.custom.chart.group2" bundle="${i18n_report}" /></label>
				<div class="col-md-7">
					<table class="table table-striped display" cellspacing="0" width="100%">
						<thead>
							<tr>
								<th style="width: 10px;"></th>
								<th><fmt:message key="report.custom.chart.stat.fields" bundle="${i18n_report}" /></th>
								<th><fmt:message key="report.custom.chart.stat.calc" bundle="${i18n_report}" /></th>
							</tr>
						</thead>
						<tbody id="tbody_series">
							<c:forEach items="${statItems }" var="statitem">
							<tr>
								<td class=" select-checkbox"></td>
								<td>
									<input type=<c:choose><c:when test="${allowMulti == true }">"checkbox"</c:when><c:otherwise>"radio"</c:otherwise></c:choose> name="chartserie" value="${statitem.name }" data-stat="${statitem.statName }" />
									${statitem.text }
								</td>
								<td><fmt:message key="report.aggregate.${statitem.statName }" bundle="${i18n_report}" /></td>
							</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
				<p class="form-control-static"></p>
			</div>
		</div>
	</div>
</body>
</html>